import React, {Component} from 'react';

import Home_part from './partComponent/Home_part';
import News_list from './partComponent/News_list';
import Notice_list from './partComponent/Notice_list';
import Create_ques from './partComponent/Create_ques';
import Ques_temp from './partComponent/Ques_temp';
import Regis_ques from './partComponent/Regis_ques';
import Ques_invite from './partComponent/Ques_invite';
import Create_user from './partComponent/Create_user';
import Users_list from './partComponent/Users_list';
import Port_list from './partComponent/Port_list';
import Create_port from './partComponent/Create_port';
import Log from './partComponent/Log';
// import Role_list from './partComponent/Role_list';
// import Create_role from './partComponent/Create_role';
import Syst_para from './partComponent/Syst_para';
// import Create_news from './partComponent/Create_news';
// import Create_notic from './partComponent/Create_notic';
import SearchTree from '../component/Case_search';
import { Layout} from "antd";
import UpLoad from "./partComponent/UpLoad";
import DataSearch from "./search/DataSearch";
import ResearchGroup1 from "./search/ResearchGroup1";
import ResearchGroup2 from "./search/ResearchGroup2";
import ResearchGroup3 from "./search/ResearchGroup3";
import ResearchGroup4 from "./search/ResearchGroup4";
import ResearchGroup5 from "./search/ResearchGroup5";
import ResearchGroup7 from "./search/ResearchGroup7";
import ResearchGroup8 from "./search/ResearchGroup8";

const {Header, Content, Footer} = Layout;

export default class Admin_body extends Component {
    constructor(props) {
        super(props);
        this.state = {
            choose_num: this.props.choose,
            // collapsed: 'menu-unfold',
            choose_arr: [
                <Home_part {...this.props} />,
                <News_list {...this.props} />,
                <Notice_list {...this.props} />,
                <Create_ques {...this.props} />,
                <Ques_temp {...this.props} />,
                <SearchTree {...this.props} />,
                <Ques_invite/>,
                <Regis_ques{...this.props}/>,
                <Create_user {...this.props}/>,
                <Users_list {...this.props} />,
                <Port_list {...this.props} />,
                <Create_port {...this.props} />,
                // <Role_list {...this.props} />,
                <Syst_para/>,
                <UpLoad/>,
                <DataSearch/>,
                <ResearchGroup1/>,
                <ResearchGroup2/>,
                <ResearchGroup3/>,
                <ResearchGroup4/>,
                <ResearchGroup5/>,
                <ResearchGroup7/>,
                <SearchTree {...this.props} />,//<ResearchGroup8/>,
                <Log/>
            ],
        }
    }

    render() {
        return (
            <Layout>
                <Header style={{background: '#fff', padding: 0}}>
                    <div className="head_right">
                        <img src={require("../img/logo-whut.png")}/>
                    </div>
                </Header>
                <Content style={{margin: '1%', overflow: 'auto'}}>
                    <div style={{padding: 24, background: '#fff', height: '100%'}}>
                        <div className="choose">
                            {this.state.choose_arr[this.props.choose]}
                        </div>
                    </div>
                </Content>
                <Footer style={{textAlign: 'center', color: 'white', backgroundColor: 'black'}}>
                    SmartLab Design ©2018 Powered By 武汉理工大学智能技术实验室
                </Footer>
            </Layout>
        )
    }
}